A NAND type flash memory with memory cells arranged three-dimensionally has been developed and it is desirable to provide such a device and a controller for the device with improved operation reliability.